﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IService
{
    public interface IWhInboundService
    {
        /// <summary>
        /// 获取所有入库单信息
        /// </summary>
        /// <returns></returns>
        Task<List<WhInbound>> GetAllInboundInfo();

        /// <summary>
        /// 查询仓库信息用于下拉框
        /// </summary>
        /// <returns></returns>
        Task<List<WareHouseDTO>> GetWareHouseInfoForSelect();

        /// <summary>
        /// 多条件查询入库单
        /// </summary>
        /// <param name="wisws"></param>
        /// <returns></returns>
        Task<List<WhInbound>> GetSomeInboundInfo(WhInbSelectWithSth wisws);

        /// <summary>
        /// 批量删除入库单
        /// </summary>
        /// <param name="orderIdList"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<int> DeleteWhInbound(List<long> orderIdList, long userId);


        /// <summary>
        /// 可批量撤销入库单
        /// </summary>
        /// <param name="orderIdList"></param>
        /// <param name="orderStatu"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<int> ChangeWhInboundStatu(List<long> orderIdList, string orderStatu, long userId);

        /// <summary>
        /// 可批量审核/驳回入库单
        /// </summary>
        /// <param name="whOrderId"></param>
        /// <param name="orderStatu"></param>
        /// <param name="auditorId"></param>
        /// <param name="auditorComment"></param>
        /// <returns></returns>
        Task<int> AuditeWhInboundOrder(
                                                        List<long> whOrderIdList,
                                                        string orderStatu,
                                                        long auditorId,
                                                        string auditorComment
                                                    );

        /// <summary>
        /// 关联单号查询
        /// </summary>
        /// <returns></returns>
        Task<List<OmPurchaseOrderSourceDetail>> OmPurchaseOrderSourceDetailsForSelect();

        /// <summary>
        /// 多条件查询关联进货单号详细信息
        /// </summary>
        /// <param name="wisws"></param>
        /// <returns></returns>
        Task<List<OmPurchaseOrderSourceDetail>> GetOmPurchaseOrderSourceWithSth(WhInSelectWithSth wisws);

        /// <summary>
        /// 通过进货订单ID查询商品详细信息
        /// </summary>
        /// <param name="upOrderId"></param>
        /// <returns></returns>
        Task<List<OmPurOrderGoodsDetail>> GetOmPurOrderGoodsDetail(long upOrderId);

        /// <summary>
        /// 根据仓库ID查询库位信息和库存量用于入库选择
        /// </summary>
        /// <param name="warehouseId"></param>
        /// <returns></returns>
        Task<List<WhLocationSelect>> SelectWhLocationForInbound(long warehouseId);

        /// <summary>
        /// 添加入库单、入库明细和附件
        /// </summary>
        /// <param name="wifa"></param>
        /// <param name="widfaList"></param>
        /// <param name="sadList"></param>
        /// <returns></returns>
        int AddWhInbound(WhInboundForAdd wifa,List<WhInboundDetailForAdd> widfaList,List<SysAttachmentDTO> sadList);
    }
}
